﻿package com
{
	import com.slurm.Screen;
	import flash.events.MouseEvent;

	public class ScreenEjemplo2 extends Screen
	{

		public function ScreenEjemplo2(script:String = "")
		{
			super(script);
		}
		
		override public function screenReady()
		{
			super.screenReady();
			video.play();
			playBtn.addEventListener(MouseEvent.MOUSE_DOWN,playVideo);
			pauseBtn.addEventListener(MouseEvent.MOUSE_DOWN,pauseVideo);
		}

		private function playVideo(e:MouseEvent)
		{
			video.play();
		}
		
		private function pauseVideo(e:MouseEvent)
		{
			video.pause();
		}
		
		override public function destroy(){
			super.destroy();
			video.stop();
		}

	}

}